package com.cool.mapper.sysmanagemapper;

import cn.hutool.core.date.DateTime;
import com.cool.bo.sysmanage.role.AllocResource;
import com.cool.po.sysmanagepo.RolePermissionPo;
import org.apache.ibatis.annotations.Param;

public interface RolePermissionPoMapper {
    /**
     * delete by primary key
     *
     * @param rolePermissionId primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer rolePermissionId);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(RolePermissionPo record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(RolePermissionPo record);

    /**
     * select by primary key
     *
     * @param rolePermissionId primary key
     * @return object by primary key
     */
    RolePermissionPo selectByPrimaryKey(Integer rolePermissionId);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(RolePermissionPo record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(RolePermissionPo record);

    Integer bulkInsert(@Param("allocResource") AllocResource allocResource, @Param("date") DateTime date);

    Integer deleteByRoleId(Integer roleId);
}